package com.briup.mybatis01code.mapper;

import com.briup.mybatis01code.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.sql.Date;
import java.util.List;

@Mapper
@Component
public interface UserMapper {

    @Select("select *  from t_user")
    List<User>  findAll();

    @Select("select *  from t_user where id=#{id}")
    User findById(Integer id);

    void deleteById(Integer id);

    void  save(User  user);

    public void insert_id(User user);

    public void insert_id2(User user);

    public void update(User user);

    public User getById(Integer id);

    public List<User> list(@Param("name") String name, @Param("gender") Integer gender, @Param("begin") Integer  beginAge, @Param("end") Integer endAge);

   void  dynamicUpdate(User user);

    void deleteByIds(List<Integer> ids);
}
